Repository navigation
feat(scratch): report the scratch shell's own cwd - #981
Merged
Merged
Conversation
A custom command fired from the scratch terminal got the main pane's directory in AGT_SESSION_PWD, so a file name selected from an ls in the scratch resolved against the wrong directory. - the scratch's OSC 7 reports go to Session.scratchCwd, never the row's cwd or title; a local scratch seeds it with its start directory - AGT_SESSION_PWD from the scratch is that directory. AGT_SESSION_HOST is empty from the local scratch of an attached session, so the pair names one shell; a remote window's scratch keeps the host - the palette and keymap run keep the primary or split pane, as documented - relative links libghostty leaves raw resolve against a local scratch's cwd - tree reports scratchCwd while a scratch exists, shown or hidden - cwd(for:), remoteHost(for:) and localWorkingDirectory move to Session+PaneDirectory.swift, keeping Session.swift under the length limit Related to #976
A server scratch dropped or replaced while it had no surface kept the old daemon's directory, so the next scratch reported it in AGT_SESSION_PWD and tree.scratchCwd until its shell sent OSC 7. The clear moves from closeScratch into releaseScratchOwnedState, which every departing path runs; a reattach to the same daemon does not, so its directory survives. Also splits a two-sentence line in the control-api rule.
Deploying agterm with
|
| Latest commit: |
abd6bfb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a49d6fec.agterm.pages.dev |
| Branch Preview URL: | https://scratch-cwd.agterm.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
a custom command fired from the scratch terminal got the main pane's directory in
AGT_SESSION_PWD, so a file name selected from anlsin the scratch resolved against the wrong directory.Session.scratchCwd, never the row's cwd or title. A local scratch seeds it with its start directory, and it is cleared whenever a scratch departsAGT_SESSION_PWDfrom the scratch is that directory.AGT_SESSION_HOSTis empty from the local scratch of an attached session, so the pair names one shell; a remote window's server scratch keeps the host./main.go:42) resolve against a local scratch's cwdtreereportsscratchCwdwhile a scratch exists, shown or hidden, and the human tree output shows it when it differs from the session cwdcwd(for:),remoteHost(for:)andlocalWorkingDirectorymove toSession+PaneDirectory.swiftto keepSession.swiftunder the file length limitskill reference,
site/commands.html,site/docs.htmland the control-api/keymap rules are updated.Related to #976